package com.study.component1;

import com.study.dto.Tang;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.stereotype.Component;

/**
 * @Author tanglingyu
 * @Date: 2021/04/21/ 12:05
 * @Description
 */
@Component
public class TestComponent1 {

  private Tang tang;


  @Autowired
  public TestComponent1(@Qualifier("tang") Tang tang) {
    this.tang = tang;
    System.out.println(tang.getName());
  }
}
